package ferus.tigris.lines.Builders;

import java.util.ArrayList;
import java.util.List;

import android.graphics.Bitmap;
import ferus.tigris.lines.GameView;
import ferus.tigris.lines.views.ComposeSprite;
import ferus.tigris.lines.views.LinearSprite;
import ferus.tigris.lines.personages.AbstractBehavior;
import ferus.tigris.lines.personages.Buggy;
import ferus.tigris.lines.personages.KillerBehavior;
import ferus.tigris.lines.personages.KillerWithEffectBehavior;
import ferus.tigris.lines.personages.Mark;
import ferus.tigris.lines.personages.ViewsManager;

public class BuggyBuilder extends AbstractBehaviorBuilder {

	public AbstractBehavior create(GameView view) {
		List<LinearSprite>sprites = new ArrayList<LinearSprite>();
		
		Bitmap img = ImagesPool.instance(view).getBug1();
		sprites.add(new LinearSprite(img, 4, 30, 1000));
		img = ImagesPool.instance(view).getBug2();
		sprites.add(new LinearSprite(img, 4, 30, 1000));
		
		ComposeSprite sprite = new ComposeSprite(sprites);
		Mark behavior = new Buggy(null, view);
		ViewsManager viewManager = new ViewsManager(behavior, sprite); 
		KillerBehavior killer = new KillerWithEffectBehavior(viewManager); 
		return killer;
	}

}
